CXX		= g++
CXXFLAGS	= -std=c++0x
### -pthread obligatoire, pas -lpthread
LDFLAGS		= -pthread
SRC		= $(wildcard *.cpp)
OBJ		= $(SRC:.cpp=.o)

###--------------------------------------------------------
### Main target
###--------------------------------------------------------
EXEC=hello

all: $(EXEC)

###--------------------------------------------------------
### Main rules
###--------------------------------------------------------

hello: $(OBJ)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^

%.o: %.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<

###--------------------------------------------------------
### Clean
###--------------------------------------------------------
.PHONY: clean mrproper

clean:
	rm -f *.o *~

mrproper: clean
	rm -f $(EXEC)

